package stool.strategy;

import java.math.BigDecimal;

/**
 * @author Felix YF Dong
 * @date 2021/5/2
 * @description 打折收费子类
 */
public class CashRebate extends CashSuper{

    private BigDecimal moneyRebate = BigDecimal.ONE;

    public CashRebate(BigDecimal moneyRebate) {
        this.moneyRebate = moneyRebate;
    }

    @Override
    public Object acceptCash(BigDecimal money) {

        return money.multiply(this.moneyRebate);
    }
}
